<?php

namespace IDock\Insurance\TPBX\Request;

use IDock\Insurance\TPBX\Request\AllTPBXRequest;
use IDock\Insurance\TPBX\Response\VehicleModelResponse;
use IDock\Visitor\VehicleModelVisitor;

class VehicleModelRequest extends AllTPBXRequest
{
    public $route = 'webapi/v1/vehicle/query';

    protected $response = VehicleModelResponse::class;

    protected $urlTip = '车型查询';

    /*** @var  VehicleModelVisitor $visitor */
    protected $visitor;

    public function generate(): array
    {
        $this->setConfig($this->visitor->argc);
        $modelName = str_replace("牌",'',$this->visitor->vehicleModel);
        return [
            'vehicle' => [
                'vehicleName' => $modelName,
                'vehicleFrameNo' => $this->visitor->vin,
//                'autoModelCode' => '',
                'usageAttributeCode' => '1',
            ]
        ];
    }
}
